package Java.j1;

import java.util.Scanner;

public class AcWing_655 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        int y = N / 365;
        int m = (N % 365) / 30;
        int d = (N % 365) % 30;
        System.out.println(y + " ano(s)");
        System.out.println(m + " mes(es)");
        System.out.println(d + " dia(s)");
    }
}
